package com.globant.navarrete.fabio.rest.entities;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Class representing the Book object to be used in the example
 * application
 * 
 * @author fabio.navarrete
 */
@Entity
@Table(name = "book")
public class Book implements Serializable {
  /**
   * 
   */
  private static final long serialVersionUID = -5950680694358053598L;
  @Id
  @Column
  private Integer id;
  @Column
  private String isbn;
  @Column
  private String title;
  @ManyToOne
  @JoinColumn(name = "id_library")
  private Library library;

  public Integer getId() {
    return id;
  }

  public void setId(Integer id) {
    this.id = id;
  }

  public String getIsbn() {
    return isbn;
  }

  public void setIsbn(String isbn) {
    this.isbn = isbn;
  }

  public String getTitle() {
    return title;
  }

  public void setTitle(String title) {
    this.title = title;
  }

  public Library getLibrary() {
    return library;
  }

  public void setLibrary(Library library) {
    this.library = library;
  }

}
